<!doctype html>
<html lang="en">
<head>
	<title>添加用户</title>
	<meta charset="UTF-8">
	<script type="text/javascript" src="__PUBLIC__/hdjs/jquery-1.11.3.min.js"></script>
    <link rel="stylesheet" href="__PUBLIC__/hdjs/hdjs.css"/>
    <script type="text/javascript" src="__PUBLIC__/hdjs/hdjs.min.js"></script>
	<link href="__PUBLIC__/css/mine.css" type="text/css" rel="stylesheet" />
</head>
<body>
	<div class="div_head">
		<span>
			<span style="float: left;">当前位置是：用户管理 >>添加用户</span>
		</span>
	</div>
	<div class="hd-w500" style="padding:20px;margin:0 auto">
    <form name="form1" method="post" action="__SELF__">
      <table class="hd-table hd-table-form hd-form">
		<thead>
        <tr>
          <th colspan="2">添加工作人员</th>
        </tr>
		</thead>
        <tr>
          <td width="100">用户名称：</td>
          <td><input name="mg_name" type="text" class="hd-w200"></td>
        </tr>
        <tr>
          <td>选择所属部门：</td>
          <td><select name="mg_bm_id" class="hd-w200">
          <volist name='bm' id='b'>
              <option value="{$b.id}">{$b.html}{$b.name}</option>
          </volist>
          </select></td>
        </tr>
        <tr>
          <td>选择用户角色：</td>
          <td><select name="mg_role_id" class="hd-w200">
          <volist name='role_l' id='vo'>
            	<option value="{$vo.role_id}">{$vo.role_name}</option>
          </volist>
          </select></td>
        </tr>
        <tr>
          <td>选择使用的仓库：</td>
          <td><select name="mg_c_id" class="hd-w200">
            <option value="0">不指定仓库</option>
          <volist name='c_list' id='c'>
              <option value="{$c.id}">{$c.html}{$c.name}</option>
          </volist>
          </select></td>
        </tr>
        <tr>
          <td>用户密码：</td>
          <td><input name="mg_pwd" type="password" class="hd-w200"></td>
        </tr>
        <tr>
          <td>确认密码：</td>
          <td><input name="c_mg_pwd" type="password" class="hd-w200" ></td>
        </tr>
        <tr>
          <td colspan="2" align="center"><input type="submit" class="hd-btn hd-btn-default" value="提交"></td>
        </tr>
      </table>
    </form>
	</div>
<!--表单验证Start-->
<script>
    $(function () {
        $('form').validate({
            mg_name: {
                rule: {
                    required: true
                },
                error: {
                    required: '用户名称不能为空'
                },
                success: '验证通过',
                message: '请输入用户名称'
            },
            mg_pwd: {
                rule: {
                    required: true,
                    confirm: 'c_mg_pwd'
                },
                error: {
                    required: '密码不能为空',
                    confirm: '两次密码不一致'
                }
            },
        })
    })
</script>
<!--表单验证End-->
    </body>
</html>
